home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / getpixels.z / getpixels
Text File  |  1998-10-30  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333TTTTkkkk))))                                            TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_GetPixels, Tk_GetScreenMM - translate between strings and screen units
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  13.  
  14.      int
  15.      TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((_i_n_t_e_r_p, _t_k_w_i_n, _s_t_r_i_n_g, _i_n_t_P_t_r))))
  16.  
  17.      int
  18.      TTTTkkkk____GGGGeeeettttSSSSccccrrrreeeeeeeennnnMMMMMMMM((((_i_n_t_e_r_p, _t_k_w_i_n, _s_t_r_i_n_g, _d_o_u_b_l_e_P_t_r))))
  19.  
  20. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  21.      Tcl_Interp   *_i_n_t_e_r_p    (in)      Interpreter to use for error reporting.
  22.  
  23.      Tk_Window    _t_k_w_i_n      (in)      Window whose screen geometry determines
  24.                                        the conversion between absolute units
  25.                                        and pixels.
  26.  
  27.      char         *_s_t_r_i_n_g    (in)      String that specifies a distance on the
  28.                                        screen.
  29.  
  30.      int          *_i_n_t_P_t_r    (out)     Pointer to location in which to store
  31.                                        converted distance in pixels.
  32.  
  33.      double       *_d_o_u_b_l_e_P_t_r (out)     Pointer to location in which to store
  34.                                        converted distance in millimeters.
  35.  
  36.  
  37. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  38.      These two procedures take as argument a specification of distance on the
  39.      screen (_s_t_r_i_n_g) and compute the corresponding distance either in integer
  40.      pixels or floating-point millimeters.  In either case, _s_t_r_i_n_g specifies a
  41.      screen distance as a floating-point number followed by one of the
  42.      following characters that indicates units:
  43.  
  44.      <none>
  45.           The number specifies a distance in pixels.
  46.  
  47.      cccc    The number specifies a distance in centimeters on the screen.
  48.  
  49.      iiii    The number specifies a distance in inches on the screen.
  50.  
  51.      mmmm    The number specifies a distance in millimeters on the screen.
  52.  
  53.      pppp    The number specifies a distance in printer's points (1/72 inch) on
  54.           the screen.
  55.  
  56.      TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss converts _s_t_r_i_n_g to the nearest even number of pixels and
  57.      stores that value at *_i_n_t_P_t_r.  TTTTkkkk____GGGGeeeettttSSSSccccrrrreeeeeeeennnnMMMMMMMM converts _s_t_r_i_n_g to
  58.      millimeters and stores the double-precision floating-point result at
  59.      *_d_o_u_b_l_e_P_t_r.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333TTTTkkkk))))                                            TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      Both procedures return TTTTCCCCLLLL____OOOOKKKK under normal circumstances.  If an error
  75.      occurs (e.g. _s_t_r_i_n_g contains a number followed by a character that isn't
  76.      one of the ones above) then TTTTCCCCLLLL____EEEERRRRRRRROOOORRRR is returned and an error message is
  77.      left in _i_n_t_e_r_p->_r_e_s_u_l_t.
  78.  
  79.  
  80. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  81.      centimeters, convert, inches, millimeters, pixels, points, screen units
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.